package com.lbw.decorator;

/**
 * @author lbw
 * @version 1.0
 * @date 2021/6/4 18:53
 */
public class Decorator extends Drink {

    private Drink drink;

    public Decorator(Drink drink) {
        this.drink = drink;
    }

    @Override
    public float cost() {
        return super.getPrice() + drink.cost();
    }

    @Override
    public String getDes() {
        return super.getDes() + " " + super.getPrice() + "&& " + drink.getDes();
    }
}
